{extends file="backend/index.tpl"} {block name="page-content"} 
<form id="validate" method="POST" action="{$base_url}admin/book/updateBook" enctype="multipart/form-data">
	<input type="hidden" class="validate[required]" name="id" value="{$book.book_id}" />
	<div class="row-fluid">
		<div class="span6">
			<div class="block">
				<div class="head">
					<h2>Update Book</h2>
					<ul class="buttons">
						<li><a href="#" onclick="source('form_default'); return false;">
								<div class="icon">
									<span class="ico-info"></span>
								</div> </a>
						</li>
					</ul>
				</div>
				<div class="data-fluid">
					<div class="row-form">
						<div class="span3">Name</div>
						<div class="span9">
							<input type="text" class="validate[required]" name="name" value="{$book.book_name}"/> <span
								class="bottom">Required</span>
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Page Title</div>
						<div class="span9">
							<input type="text" id="pageTitle" name="page_title" value="{$book.page_title}" />
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Page Keyword</div>
						<div class="span9">
							<input name="page_keyword" type="text" class="tags" value="{$book.page_keyword}" />
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Page Description</div>
						<div class="span9">
							<textarea name="page_description"
								placeholder="Placeholder example" class="validate[required]"> {$book.page_description}</textarea>
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Description</div>
						<div class="span9">
							<textarea name="description" placeholder="Placeholder example"
								class="validate[required]" style="height: 300px !important"> {$book.description}</textarea>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="span6">
			<div class="block">
				<div class="head">
					<h2></h2>
					<ul class="buttons">
						<li><a href="#" onclick="source('form_pa'); return false;">
								<div class="icon">
									<span class="ico-info"></span>
								</div> </a>
						</li>
					</ul>
				</div>
				<div class="row-form">
					<div class="span3">Category</div>
					<div class="span9">
						<select name="category_id" class="select" style="width: 100%;">
							{foreach from=$listCategory item=category}
							<option value="{$category.id}" {if $book.category_book_category_id eq $category.id}Selected{/if} >{$category.name}</option>
							{/foreach}
						</select>
					</div>
				</div>
				<div class="row-form">
					<div class="span3">Unique Name</div>
					<div class="span9">
						<input type="text" class="validate[required]" name="uname"
							value="{$book.book_uname}" /> <span class="bottom">Required</span>
					</div>
				</div>
				<div class="data-fluid">
					<div class="row-form">
						<div class="span3">Image</div>
						<div class="span9">
							<div class="input-append file" style="width: 300px;">
                                <input type="file" name="filename" style="width: 298px;"/>
                                <input type="text" name="image_id" value="{$book.book_image}"/>
                                <span class="btn">Browse</span>
                            </div> 
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Author</div>
						<div class="span9">
							<select name="author_id" class="select" style="width: 100%;">
								{foreach from=$listAuthor item=author} 
								<option value="{$author.id}" {if $book.book_author eq $author.id } Selected {/if}>{$author.name}</option>
								{/foreach}
							</select>
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Type</div>
						<div class="span9">
							<input type="radio" class="validate[required]" name="type" value="T" {if $book.book_type eq 'T'}checked="checked"{/if}/> Translate 
							<input type="radio" class="validate[required]" name="type" value="C" {if $book.book_type eq 'C'}checked="checked"{/if}/> Convert
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Use Volume</div>
						<div class="span9">
							<input type="radio" class="validate[required]" name="use_volume" value="Y" {if $book.use_volume eq 'Y'}checked="checked"{/if} /> Yes 
							<input type="radio" class="validate[required]" name="use_volume" value="N" {if $book.use_volume eq 'N'}checked="checked"{/if} /> No
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Status</div>
						<div class="span9">
							<select name="status" class="select" style="width: 100%;">
								<option value="1" {if $book.status eq 1 } Selected {/if}>Full</option>
								<option value="0" {if $book.status eq 0 } Selected {/if}>Không Hiển Thị</option>
								<option value="2" {if $book.status eq 2 } Selected {/if}>Còn Tiếp</option>
								<option value="3" {if $book.status eq 3 } Selected {/if}>Tạm Dừng</option>
							</select>
						</div>
					</div>
					<div class="row-form">
						<div class="span3">Mobile Description</div>
						<div class="span9">
							<textarea name="mob_description"
								placeholder="Có Thể để rỗng nha!!!"
								style="height: 300px !important">{$book.mob_description}</textarea>
						</div>
					</div>
					<div class="toolbar bottom tar">
						<div class="btn-group">
							<button class="btn btn-info" type="button"
								onClick="$('#validate').validationEngine('hide');">Ẩn Thông Báo</button>
							<button class="btn" type="submit" name="submit" id="addBook">Chỉnh Sửa Truyện
								</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</form>
{/block}

